package com.ruochen.recipe.customer;

import com.blankj.utilcode.util.SizeUtils;

public class OrderItemDecoration extends SpacesItemDecoration {

    private final int dp12 = SizeUtils.dp2px(12);
    private final int dp16 = SizeUtils.dp2px(16);
    private final int dp8 = SizeUtils.dp2px(8);

    @Override
    public int getSpaceLeft(int position, int itemCount) {
        return dp16;
    }

    @Override
    public int getSpaceRight(int position, int itemCount) {
        return dp16;
    }

    @Override
    public int getSpaceTop(int position, int itemCount) {
        if(position == 0){
            return dp12;
        }
        return dp8;
    }

    @Override
    public int getSpaceBottom(int position, int itemCount) {
        if(position == itemCount - 1){
            return dp12;
        }
        return 0;
    }
}
